import {request} from "../utils/request.js";

export default {
    login (data) {
        return request({
            url: '/users/login',
            method: 'post',
            data,
        });
    },
    getPermisssonList () {
        return request({
            url: '/users/getPermissionList',
            method: 'get',
            
        });
    },
    getUserList (data) {
        return request({
            url: '/users/list',
            method: 'get',
            data,
        });
    },
    getDeptList (data) {
        return request({
            url: '/dept/list',
            method: 'get',
            data,
        });
    }, 
    getRoleNameList (data) {
        return request({
            url: '/roles/list',
            method: 'get',
            data,
        });
    },
    operate (data) {
        return request({
            url: '/users/operate',
            method: 'post',
            data,
        });
    },
    delteSelect (data) {
        return request({
            url: '/users/delete',
            method: 'post',
            data,
        });
    },
    
    getMenuList (data) {
        return request({
            url: '/menu/list',
            method: 'get',
            data,
        });
    },
    getAllUser (data) {
        return request({
            url: '/users/all/list',
            method: 'get',
            data,
        });
    },
    menuOperate (data) {
        return request({
            url: '/menu/operate',
            method: 'post',
            data,
        });
    },
    deptOperate (data) {
        return request({
            url: '/dept/operate',
            method: 'post',
            data,
        });
    },
    getRoleList (data) {
        return request({
            url: '/roles/list',
            method: 'get',
            data,
        });
    },
    roleOperate (data) {
        return request({
            url: '/roles/operate',
            method: 'post',
            data,
        });
    },
    rolePermission (data) {
        return request({
            url: '/roles/update/permission',
            method: 'post',
            data,
        });
    },
    getLeaveList (data) {
        return request({
            url: '/leave/list',
            method: 'get',
            data,
        });
    },
    leaveOperate (data) {
        return request({
            url: '/leave/operate',
            method: 'post',
            data,
        });
    },
    judegLeave (data) {
        return request({
            url: '/leave/approve',
            method: 'post',
            data,
        });
    },
};